﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManageINewsClass.aspx.cs" Inherits="Manageweb_ManageINews_ManageINewsClass" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    
<link href="../images/css.css" rel="stylesheet" type="text/css" />
    
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table border="1" cellpadding="0" cellspacing="0" width="750">
            <tr>
                <td style="font-weight: bold; color: white; background-color: #507cd1; text-align: left">
                    &nbsp;管理图文类别</td>
            </tr>
        </table>
        <br />
        <table id="TABLE_Add_Mod" runat="server" border="1" cellpadding="0" cellspacing="0"
            width="750">
            <tr>
                <td colspan="2" style="font-weight: bold; color: white; background-color: #507cd1;
                    text-align: left">
                    &nbsp;<asp:Label ID="LB_TableTitle" runat="server"></asp:Label>
                    <asp:Label ID="LB_ID" runat="server" Visible="False"></asp:Label></td>
            </tr>
            <tr>
                <td style="width: 150px">
                    &nbsp;标题名称</td>
                <td style="text-align: left">
                    &nbsp;<asp:TextBox ID="TB_Title" runat="server" Width="240px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RFV_TB_Title" runat="server" ControlToValidate="TB_Title"
                        Display="Dynamic" ErrorMessage="*" ValidationGroup="Btn_Submit"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td>
                    &nbsp;所属类别</td>
                <td style="text-align: left">
                    &nbsp;<asp:DropDownList ID="DDL_Class" runat="server" Width="246px">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RFV_DDL_Class" runat="server" ControlToValidate="DDL_Class"
                        Display="Dynamic" ErrorMessage="*" ValidationGroup="Btn_Submit"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td colspan="2" style="font-weight: bold; color: white; background-color: #507cd1">
                    <asp:Button ID="Btn_Submit" runat="server" Text="提交" ValidationGroup="Btn_Submit" />&nbsp;<asp:Button
                        ID="Btn_Cancel" runat="server" Text="取消" /></td>
            </tr>
        </table>
        <br />
        <asp:Label ID="LB_ManageINewsClass" runat="server" Font-Bold="True" Font-Size="Small"
            ForeColor="Red"></asp:Label>
        <table border="1" cellpadding="0" cellspacing="0" width="750">
            <tr>
                <td>
                    <asp:GridView ID="GV_INewsClass" runat="server" Width="100%" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="INC_ID" DataSourceID="ODS_INewsClass" ForeColor="#333333">
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <Columns>
                            <asp:BoundField DataField="INC_ID" HeaderText="INC_ID" InsertVisible="False" ReadOnly="True"
                                SortExpression="INC_ID" Visible="False" />
                            <asp:TemplateField HeaderText="标题" SortExpression="INC_Title">
                                <ItemStyle HorizontalAlign="Left" />
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# FormatClassTitle(Eval("INC_Title"), Eval("INC_Level")) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="INC_Level" HeaderText="级别" SortExpression="INC_Level" />
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton ID="LBtn_Add" runat="server" OnCommand="LBtn_Add_Command">添加</asp:LinkButton>
                                    <asp:LinkButton ID="LBtn_Mod" runat="server" OnCommand="LBtn_Mod_Command" CommandArgument='<%# Eval("INC_ID") %>'>修改</asp:LinkButton>
                                    <asp:LinkButton ID="LBtn_Del" runat="server" OnClientClick="return confirm('删除操作部可恢复，是否继续？')" OnCommand="LBtn_Del_Command" CommandArgument='<%# Eval("INC_ID") %>'>删除</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle BackColor="#EFF3FB" />
                        <EditRowStyle BackColor="#2461BF" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <PagerStyle BackColor="#507CD1" ForeColor="White" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                        <EmptyDataTemplate>
                            <asp:Button ID="Btn_Add" runat="server" OnCommand="LBtn_Add_Command" Text="添加新分类" />
                        </EmptyDataTemplate>
                        <EmptyDataRowStyle BackColor="#507CD1" />
                    </asp:GridView>
                    <asp:ObjectDataSource ID="ODS_INewsClass" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataOrderByClassCode" TypeName="AccessDAL.INewsClassTableAdapters.INewsClassTableAdapter">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="false" Name="INC_IsLock" Type="Boolean" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
